package day06;

import java.util.Arrays;

/**
 * 数组的排序
 * @author XingHaiYang
 * @date 2022/9/14 14:23
 */
public class ArrayDemo {
    public static void main(String[] args) {
        int[] arr = new int[10];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = (int)(Math.random()*100);
            System.out.println(arr[i]);
        }
        Arrays.sort(arr);//升序排序

        System.out.println("排序后:");
        for(int i=0;i<arr.length;i++){
            System.out.println(arr[i]);
        }
    }
}
